package demo1;

import com.leyou.LyCeshiApplication;
import lombok.extern.log4j.Log4j;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = LyCeshiApplication.class)
public class Demo1 {

    @Test
    public void test1(){
        String s="rrrrr";

        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("常规方式,线程执行");
            }
        }).start();

        new Thread(()->{
            System.out.println("新的方式创建线程");
        }).start();
    }
}
